﻿using System.Web.Mvc;
using Journal.Common.Helpers.HtmlControls;

namespace Journal.Common.Objects.Column
{
    public class ImageLinkColumn : BaseColumn
    {
        public string ActionUrl { get; set; }

        public string Value { get; set; }

        public string ImageSrc { get; set; }

        public ImageLinkColumn(string url, string value, string imageSrc)
        {
            ActionUrl = url;
            Value = value;
            ImageSrc = imageSrc;
        }

        public override MvcHtmlString Render()
        {
            return TableControl.ImageLinkColumn(Value, ActionUrl, ImageSrc);
        }
    }
}